<?php $p = $this->profile ?>

<div style="float:left; width:550px;">
    <div class="block">
        <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="90px" height="90px" alt="" />
        <a href="/dine_dev_roman/public/dine/index.php/profile/upload/1">Upload Image</a>
    </div>

    <div class="block">
        <h2><?= $p['firstname'] ?> <?= $p['lastname'] ?></h2>
        <p><?= $p['age'] ?> / <span><?= $p['gender_name'] ?></span></p>
        <p><?= $p['city_name'] ?>, <?= $p['state_code'] ?></p>
    </div>

    <!-- <div class="block">
        <a href="javascript:App.Page.addUserToFavorites(1)">Add to Favorites</a>
        <a href="/dine_dev_roman/public/dine/index.php/profile/follower-add/id/1">Follow</a>
    </div> -->

    <div class="block">
        <a href='/dine_dev_roman/public/dine/index.php/profile/1'>Bio</a>
        <a href='/dine_dev_roman/public/dine/index.php/user/list-photo-albums/1'>Photos</a>
        <a href='/dine_dev_roman/public/dine/index.php/profile/comments/1'>Comments</a>
        <a href='/dine_dev_roman/public/dine/index.php/profile/comments/1'>Owned Places</a>
    </div>

    <div class="block">
        <h2>Basic Information</h2>
        <p style="color:red;"><?= $this->errorMsg; ?></p>
        <?= $this->formProfile->setAction($this->commonUrl . '/profile'); ?>
    </div>

    <!-- <div class="block">
        <form id="send-message-form">
            <input type="hidden" class="to_user" name="to_user" value="1" autocomplete="off" />
            Title: <input type="text" class="title" name="title" value="" />
            <br />
            Body: <textarea class="body" name="body" autocomplete="off"></textarea> 
            <br />
            <input type="submit" value="Send" />
            <a onClick="clearMessageData();" href="#">Close</a>
        </form>
    </div> -->

    <div class="block">
        <h2>My self-summary</h2>
        <br />
        <p><?= ($p['bio'] ? : 'No bio at the moment') ?></p>
        <br />
        <!-- <a href="/dine_dev_roman/public/dine/index.php/profile/follower-add/id/1">Follow</a> -->
        <?php if (!empty($this->reviews)) { ?>
            <h2><?= $p['firstname'] , ' ', $p['lastname'] ?>'s Reviews</h2>
            <br />
            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                <?php foreach ($this->reviews as $r) { ?>
                <tr>
                    <td>
                        <?= $r['description'] ?>
                    </td>
                </tr>
                <?php } ?>
            </table>
        <?php } ?>
    </div>

</div>

<div style="float:left; width:420px; margin-left:30px;">
    <div class="block">
        <h2>Details</h2>
        <table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td>Favorite Foods</td>
                <td>Burgers, Bulgarian, Burritos, Californian, Central American</td>
            </tr>
            <tr>
                <td>Location</td>
                <td><?= $p['city_name'] ?>, <?= $p['state_code'] ?></td>
            </tr>
            <tr>
                <td>Gender</td>
                <td><?= $p['gender_name'] ?></td>
            </tr>
        </table>
    </div>

    <div class="block">
        <h2>Friends of Romanich</h2>
        <div>
            <table>
                <tr>
                    <td width="33%">
                        <span>
                            <a style="float:left;" href="/dine_dev_roman/public/dine/index.php/profile/2482468">
                                <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="36" alt="#" />
                            </a>
                            <div style="float:left;">
                                <p><a href='/dine_dev_roman/public/dine/index.php/profile/2482468'>Chiriac Alexandru</a></p>
                                <p>0 Revs</p>
                            </div>
                        </span>
                    </td>
                    <td width="33%" style="border:none; border-bottom:1px solid #ccc;border-right:1px solid #ccc;">
                        <span>
                            <a style="float:left;" href="/dine_dev_roman/public/dine/index.php/profile/2482474">
                                <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="36" alt="#" /></a>
                            <div style="float:left;">
                                <p><a href='/dine_dev_roman/public/dine/index.php/profile/2482474'>Sandu Chiriac</a></p>
                                <p>0 Revs</p>
                            </div>
                        </span>
                    </td>
                    <td width="33%">
                        <span>
                            <a style="float:left;" href="/dine_dev_roman/public/dine/index.php/profile/2482484">
                                <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="36" alt="#" />
                            </a>
                            <div style="float:left;">
                                <p><a href='/dine_dev_roman/public/dine/index.php/profile/2482484'>Alexandru Chiriac</a></p>
                                <p>0 Revs</p>
                            </div>
                        </span>
                    </td>
                </tr>
            </table>
        </div>
    </div>

    <div class="block">
        <h2>Fans of  Romanich</h2>
        <div>
            <table style="width:337px; margin:-10px -7px 0;" border="0">
                <?php for ($i = 0; $i < 2; $i++) { ?>
                <tr>
                    <td width="50%">
                        <span>
                            <a style="float:left;" href="/dine_dev_roman/public/dine/index.php/profile/2482474">
                                <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="36" alt="#" />
                            </a>
                            <div style="float:left;">
                                <p><a href='/dine_dev_roman/public/dine/index.php/profile/2482474'>Sandu Chiriac</a></p>
                                <p style="font-size:11px; margin:2px 0 0 10px; width:95px;">Unknown</p>
                            </div>
                        </span>
                    </td>
                    <td width="50%">
                        <span>
                            <a style="float:left;" href="/dine_dev_roman/public/dine/index.php/profile/2482481">
                                <img src="<?= $this->commonUrl ?>/images/profile_avatar.jpg" width="36" alt="#" />
                            </a>
                            <div style="float:left;">
                                <p><a href='/dine_dev_roman/public/dine/index.php/profile/2482481'>miche langelo</a></p>
                                <p style="font-size:11px; margin:2px 0 0 10px; width:95px;">Texas City Terminal Junction, TX</p>
                            </div>
                        </span>
                    </td>
                </tr>
                <?php } ?>
            </table>
        </div>
    </div>

    <div class="block">
        <h2>Favorites of Romanich <a href="">More</a></h2>
        <br />
        <div>
            <table width="100%" class="horizontal_list_table">
                <thead>
                    <tr align="left">
                        <th>Restaurant Name</th>
                        <th>City</th>
                        <th>Rating</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <a href="/dine_dev_roman/public/dine/index.php/restaurant/13870">Cafe Caracas</a>
                        </td>
                        <td>
                            <p style="color:#535252; font-size:12px;">Hubbard Landing, AL</p>
                        </td>
                        <td align="center">
                            <?php for ($i = 0; $i < 5; $i++) { ?>
                                <img style="margin:0 3px 0 0;float:left;" src="<?= $this->commonUrl ?>/images/star_2.jpg" alt="star" />
                            <?php } ?>
                            <br />
                            3.56/5 - <a href="/dine_dev_roman/public/dine/index.php/restaurant/13870">7</a> reviews
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>

</div>


<script type="text/javascript">
$(function() {
    $("#birth_date").datepicker({
        dateFormat: 'yy-mm-dd'
    });
});
</script>